package com.ruoyi.lm.controller;

import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.lm.domain.LmTimesrecord;
import com.ruoyi.lm.service.ILmTimesrecordService;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * 次数消费记录Controller
 * 
 * @author ruoyi
 * @date 2020-09-02
 */
@Controller
@RequestMapping("/phone/lm/timesrecord")
public class LmTimesrecordControllerPhone extends BaseController
{

    @Autowired
    private ILmTimesrecordService lmTimesrecordService;

    /**
     * 查询次数消费记录列表
     */
    @PostMapping("/listByUserId")
    @ResponseBody
    public TableDataInfo listByUserId(String userId)
    {
        LmTimesrecord lmTimesrecord = new LmTimesrecord();
        lmTimesrecord.setRecordUser(userId);
        List<LmTimesrecord> list = lmTimesrecordService.selectLmTimesrecordList(lmTimesrecord);
        return getDataTable(list);
    }
}
